Apparatus and method for preserving a region code for an optical disk drive

ABSTRACT

An apparatus and method for preserving a region code for an optical disk drive in an internal flash memory contained in a microcomputer. This region code preserving method receives a region code to be written, copies a part of the firmware for the optical disk drive stored in memory means to an external memory, and writes the received region code in the memory means separately from the firmware by the execution of the copied firmware.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to an apparatus and method for preserving a region code for an optical disk drive in an internal flash memory contained in a microcomputer.

[0003] 2. Description of the Related Art

[0004] Since the DVD industry split the world up in several DVD regions to prevent illegal copy and distribution of DVD disks, every DVD disk has a region code. DVD disks with a region code will be only playbacked on DVD players with the same region code.

[0005]FIG. 1 shows a block diagram of a DVD-ROM drive that supports Region Playback Control II (RPC II). The DVD-ROM drive stores its region code in an external flash memory 71 or an EEPROM.

[0006] When a DVD disk is loaded, the DVD-ROM drive compares its region code with that of the DVD disk. If they do not match, the DVD-ROM drive will not play the DVD disk. The region code of a DVD-ROM drive can be changed up to five times by users and can be initialized up to five times by sellers; hence, it can be changed up to 25 times.

[0007] The change of the region code is carried out by the ATAPI command “Send Key” transferred through an interface unit 51 from an external host. On receiving the command “Report Key” from the external host, the DVD-ROM drive reads the current region code and sends it to the host.

[0008] Because the region code of a DVD-ROM drive should be preserved during power-off and also be rewritable, it is commonly stored in an external flash memory 71 as shown in FIG. 1. However, the employment of the flash ROM increases the manufacturing cost of an optical disk drive and also increases the size of the printed circuit board (PCB). Instead of the flash memory, an EEPROM can be adopted to store the region code. In this case, the control of the EEPROM requires several I/O ports of the microcomputer, which also leads to design and manufacturing cost problems.

SUMMARY OF THE INVENTION

[0009] It is an object of the present invention to provide an apparatus and method for preserving a region code for an optical disk drive without an external flash memory.

[0010] The method for preserving a region code for an optical disk drive in accordance with the present invention comprises the steps of receiving a region code to be written, copying a part of the firmware for the optical disk drive stored in memory means to an external memory, and writing the received region code in the memory means separately from the firmware by the execution of the copied firmware.

[0011] The apparatus for preserving a region code for an optical disk drive in accordance with the present invention comprises an interface unit receiving a region code to be written from an external host, a first memory storing the firmware for the optical disk drive, a second memory for storing a part of the firmware, and a control unit copying a part of the firmware stored in the first memory to the second memory and storing the received region code in the first memory by separating the region code from the firmware.

BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings, which are included to provide a further understanding of the invention, illustrate the preferred embodiments of the invention, and together with the description, serve to explain the principles of the present invention.

[0013] In the drawings:

[0014]FIG. 1 is a block diagram of a conventional DVD-ROM drive;

[0015]FIG. 2 is a block diagram of the DVD-ROM drive in which the present invention may be advantageously practiced.

[0016]FIG. 3 is a flow diagram of the method in accordance with an embodiment of the present invention; and

[0017]FIG. 4 is a schematic diagram of the region code written in the flash memory in FIG. 2.

DETAILED DESCRIPTION OF THE PREFFERRED EMBODIMENT

[0018] In order that the invention may be fully understood, the preferred embodiment thereof will now be described with reference to the accompanying drawings.

[0019]FIG. 2 is a block diagram of the optical disk drive embodying the present invention, comprising a spindle motor 11 for rotating a DVD-ROM disk 10, an optical pickup 20 for reproducing signals recorded on the disk 10, a sled motor 21 for moving the optical pickup 20 along the full length of the disk radius, an R/F unit 30 for equalizing and shaping the RF signals reproduced by the optical pickup 20, a digital signal processing unit 40 for processing the binary data stream received from the R/F unit 30 to retrieve digital data, a decoder 50 for decoding the retrieved digital data, an interface unit 51 for exchanging data with an external host like a PC through the IDE bus, a drive unit 60 for driving the spindle motor 11 and the sled motor 21, a RAM 72 for storing data temporarily, and a microcomputer 70 for supervising overall operation of the drive system, the microcomputer 70 containing an internal flash memory 70 a to store the firmware and the region code of the optical disk drive.

[0020]FIG. 3 is a flow diagram of the method for writing the region code for the optical disk drive in accordance with an embodiment of the present invention, which will be explained in detail with reference to FIG. 2.

[0021] It is assumed that an external host interfaced through the IDE bus with the optical disk drive shown in FIG. 2 receives a region code from the system operator and the optical disk drive contains firmware that controls the operation of the drive. By request of the operator, the host sends the region code to the optical disk drive so that the region code may be written.

[0022] The firmware for the microcomputer 70 and the region code have been written in the flash memory 70 a contained in the microcomputer 70, the firmware and region code being separated from each other. The firmware is responsible for the overall operation of the microcomputer 70 such as system initialization, hardware control, data read-out, and so forth.

[0023] The region code is written in a predefined area of the flash memory 70 a as a 4-byte Region Playback Control (RPC) block as shown in FIG. 4. Since the region code can be modified up to 25 times as mentioned above, the predefined region code area is of a size of 25 RPC blocks.

[0024] On the condition that the flash memory 70 a contains the firmware for the microcomputer 70 and an empty space is reserved for the region code, the drive system boots at power-on (S10). After the booting completes, the microcomputer 70 is ready to communicate with the external host.

[0025] If the operator runs a communication program and requests writing of a region code, the host sends the command “SendKey” to the interface unit 51 through the IDE bus for writing the region code.

[0026] On receiving the command “SendKey” and the region code from the host (S20), the microcomputer 70 searches the internal flash memory 70 a for the location in which the RPC block is written (S21). Since the flash memory 70 a outputs the value of ‘FFh’ if not written, the location can be found by searching for a 4-byte area reading as ‘FFh’. Then, the microcomputer 70 reads the previous RPC block and stores the number of region code writing.

[0027] The microcomputer 70 copies the writing routine of the running firmware stored in the flash memory 70 a to an unused area of the RAM 72 (S22). Since the RAM 72 stores data and variables needed by the firmware, the unused area may not be enough to save the writing routine. If so, some data or variables are first copied to the buffer of the decoder 50. This is possible because the buffer is not being used while the writing routine is executed.

[0028] After copying the contents of the RAM 72 to the buffer, the microcomputer 70 copies the writing routine 5 stored in the flash memory 70 a to the RAM 72 (S30). Then, the microcomputer 70 executes the writing routine stored in the RAM 72 and writes the received region code in the searched RPC area of the flash memory 70 a (S31).

[0029] While the writing routine stored in the flash memory 70 a is executed, it is impossible to write data in an arbitrary area of the flash memory 70 a. This is why the contents of the flash memory 70 a is copied to the RAM 72 before data is written in the flash memory 70 a.

[0030] When the writing routine stored in the RAM 72 is executed, the writing routine increment by 1 the number of region code writing stored previously and writes the RPC block containing the incremented number in the reserved RPC area.

[0031] In this embodiment, the flash memory 70 a has reserved space enough to store up to 25 PRC blocks and a new region code is written without erasing previously-written region codes. This is because some flash memorys do not support random erase operations. Even if random erase is available, the erase operation tends to have precise timing requirements and thus may cause errors, which can be prevented by the method of the embodiment.

[0032] If the 25th RPC block has been written, the microcomputer 70 does not respond to the next writing requests and thus the 25th RPC block is used as a permanent region code.

[0033] If the execution of the writing routine stored in the RAM 72 finishes (S40), the microcomputer 70 returns the program flow to the routine for completing the write operation. If necessary, the microcomputer 70 moves the data copied to the buffer of the decoder 50 back to the RAM 72, thereby the contents of the RAM 72 being preserved with no data loss.

[0034] After the operation for writing the region code has been completed, the microcomputer 70 uses the latest region code written in the internal flash memory 70 a to determine whether to perform the playback of the requested DVD-ROM disk 10 (s41):

[0035] The apparatus and method for preserving a region code for an optical disk drive can reduce the volume and manufacturing cost of the optical disk drive because an additional memory for storing the region code and circuits for the memory are not required.

[0036] The invention may be embodied in other specific forms without departing from the sprit or essential characteristics thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. 

What is claimed is:
 1. A method for preserving a region code for an optical disk drive, comprising the steps of: receiving a region code to be written; copying a part of the firmware for said optical disk drive to an external memory, said firmware being stored in memory means; and writing the received region code in said memory means by the execution of the copied firmware, said firmware and region code being separated form each other in said memory means.
 2. The method set forth in claim 1 , further comprising the step of playing an optical disk inserted to said optical disk drive, based upon the written region code and the region code contained in the optical disk.
 3. The method set forth in claim 1 , wherein said memory means is an internal flash memory contained in a microcomputer.
 4. The method set forth in claim 1 , wherein said step (b) further comprising the step of copying the data of said external memory to an additional external memory.
 5. The method set forth in claim 4 , wherein said additional external memory is a memory used as a buffer for decoding means decoding data reproduced from said optical disk.
 6. The method set forth in claim 1 , wherein said step (c) writes the received region code with preserving previously-written region codes.
 7. The method set forth in claim 6 , wherein said step (c) writes the received region code in an area next to the previously-written region codes.
 8. An apparatus for preserving a region code for an optical disk drive, comprising: an interface unit receiving a region code to be written from an external host; a first memory storing the firmware for the optical disk drive; a second memory for storing a part of said firmware; and a control unit copying a part of said firmware stored in said first memory to said second memory and storing the received region code in said first memory by separating the region code from the firmware.
 9. The apparatus set forth in claim 8 , wherein said first memory is an internal flash memory contained in said control unit. 